package collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo2 {
    public static void main(String[] args) {
        Collection<String> c=new ArrayList<String>();
        System.out.println(c.add("hello"));//true代表添加成功
        System.out.println(c.add("world"));
        System.out.println(c.add("java"));
        System.out.println(c);
        System.out.println(c.remove("hello"));
        c.clear();
    }
}
